package com.acme.task4;

public class Task4Arrays {
	public static void main(String[] args) {

		int[] array = new int[10];
		array[0] = 3;
		array[1] = 7;
		array[2] = 3;
		array[3] = 9;
		array[4] = 9;
		array[5] = 7;
		array[6] = 7;
		array[7] = 7;
		array[8] = 3;
		array[9] = 7;
		
		arrayCounter(array);
	}
	
	static void arrayCounter(final int[] array){
		int numberOf3 = 0,numberOf7 = 0,numberOf9 = 0;
		for (int i = 0; i < array.length; i++) {
			if (array[i] == 3){
				numberOf3++;
			} else if(array[i] == 7){
				numberOf7++;
			} else if(array[i] == 9){
				numberOf9++;
			}
			
		}
		
		System.out.println("Number of 3: " + numberOf3);
		System.out.println("Number of 7: " + numberOf7);
		System.out.println("Number of 9: " + numberOf9);
	}
}
